﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using SoftwareConsulting.BI11.Studio.InternalServices.Properties;

namespace SoftwareConsulting.BI11.Studio.InternalServices
{        
    /// <summary>
    /// Исключения генерируемые в BI-11
    /// </summary>    
    public abstract class BIException:ApplicationException
    {
        public BIException(string message, Exception innerException, params object[] msgParams) :
            base(string.Format(message, msgParams), innerException)
        {
        }
    }   

    public class BIIncorrectNameException : BIException
    {
        public BIIncorrectNameException(Exception innerException) :
            base(Resources.BI_EXCEPTION_INCORRECT_NAME, innerException, Constants.WrongNameSymbols)
        {
        }

        public BIIncorrectNameException(Exception innerException, string wrongSymbols) :
            base(Resources.BI_EXCEPTION_INCORRECT_NAME, innerException, wrongSymbols)
        {
        }
    }    
    
    public class BIFormatNumericException : BIException
    {
        public BIFormatNumericException(Exception innerException) :
            base(Resources.BI_EXCEPTION_FORMAT_NUMERIC, innerException)
        {
        }
    }
    
    /*public class BIReportNotEnoughDataException : BIException
    {
        public BIReportNotEnoughDataException(Exception innerException) :
            base(Resources.BI_EXCEPTION_REPORT_NOTENOUGHDATA, innerException)
        {
        }
    } */       
}
